/*
 * Copyright 2010 Michael Nitsche
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.mnit.basis.daten.struktur.gruppe;


/**
 * @author Michael Nitsche
 */
public class Gruppe2<TA,TB> extends Gruppe1<TA> {

	private TB o2;


	protected Gruppe2(TA o1, TB o2) {
		super(o1);
		this.o2 = o2;
	}


	public static <TA,TB> Gruppe2<TA,TB> neu(TA o1, TB o2) {
		return new Gruppe2<TA,TB>(o1,o2);
	}

	@SuppressWarnings("unchecked")
	public static <T1,T2> Class<Gruppe2<T1,T2>> gKlasse(Class<T1> c1, Class<T2> c2) {
		return (Class<Gruppe2<T1, T2>>) Gruppe2.neu(null, null).getClass();
	}

	public TB g2() {
		return o2;
	}

	public String toString() {
		return "Gruppe2("+g1()+","+o2+")";
	}

}
